package com.yao.system.entity;


import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "user"/*,autoResultMap = true*/) //autoResultMap自动结果集映射
public class User {
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    @TableField(value = "name")
    private String name;
    @TableField(value = "password")
    private String password;
    @TableField(value = "salt")
    private String salt;
    @TableField(value = "image")
    private String image;
    @TableField(value = "sex")
    private String sex;
    @TableField(value = "type")
    private Integer type;
    @TableField(value = "company")
    private String company;//之后要去掉的字段
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    //@TableField(exist = false/*,typeHandler = JacksonTypeHandler.class*/)
    //private aa phone;    //不是数据库字段，// typeHandler = JacksonTypeHandler.class mysql的json类型与实体的映射转换
}
